package app.model;

import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import app.model.su.BaseModel;

//@QueryEntity
@Document(collection = "book")
public class Book extends BaseModel{

	private static final long serialVersionUID = 1L;
	
	@Field("name")
	private String name;
	@Field("isbn")
	private String isbn;
	@Field("author")
	private String author;
	private int pages;

	public Book() {
	}

	public Book(String name, String isbn, String author, int pages) {
		this.name = name;
		this.isbn = isbn;
		this.author = author;
		this.pages = pages;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIsbn() {
		return isbn;
	}

	public void setIsbn(String isbn) {
		this.isbn = isbn;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public int getPages() {
		return pages;
	}

	public void setPages(int pages) {
		this.pages = pages;
	}

	@Override
	public String toString() {
		return "Book [name=" + name + ", isbn=" + isbn + ", author=" + author + ", pages=" + pages + "]";
	}
	
}
